import request from '@/utils/request.js'

// 列表
export const getTrendsList = (params) => request({ url: `/web/trends/list`, method: 'get', params })
//发布动态
export const addTrends = (params) => request({ url: `/web/trends`, method: 'post', data: params, loading: true })
//删除动态
export const deleteTrends = (params) => request({ url: `/web/trends/${params}`, method: 'delete' })
//获取相册
export const queryAlbum = (params) => request({ url: `/system/album/queryAlbum`, method: 'post', data: params })
//添加相册
export const uploadAlbum = (params) => request({ url: `/system/album/uploadAlbum`, method: 'post', data: params })
//删除图片
export const deleteAlbum = (params) => request({ url: `/system/album/deleteAlbum`, method: 'post', data: params })
//获取企业信息
export const getEnterpriseInfo = (params) => request({ url: `/web/enterprise/${params}`, method: 'get' })
//获取背景图
export const BasicBackgroundImage = (params) => request({ url: `/web/enterprise/BasicBackgroundImage`, method: 'get', params })
//修改企业信息
export const changeEnterprise = (data) => request({ url: `/web/enterprise`, method: 'put', data })
//查询客户列表
export const getCustomerList = (params) => request({ url: `/web/customer/list`, method: 'get', params })
//移除企业
export const movingEnterprise = (params) => request({ url: `/web/customer/movingEnterprise`, method: 'post', params })
//转移管理员
export const transferAdmin = (params) => request({ url: `/web/customer/transferAdmin`, method: 'post', params, loading: true })
//查询企业角色列表
export const getRoleList = (params) => request({ url: `/web/role/list`, method: 'get', params })
//查询企业角色列表,不分页
export const getRoleListAll = (params) => request({ url: `/web/role/listAll`, method: 'get', params })
//新增企业角色
export const addRole = (params) => request({ url: `/web/role`, method: 'post', data: params })
//删除企业角色
export const delRole = (params) => request({ url: `/web/role/${params}`, method: 'DELETE' })
//新增用户
export const addCustomer = (data) => request({ url: `/web/customer`, method: 'post', data, loading: true })
//编辑用户
export const editCustomer = (data) => request({ url: `/web/customer`, method: 'put', data, loading: true })
//获取客户端用户详细信息
export const getCustomerInfoById = (id) => request({ url: `/web/customer/${id}`, method: 'get', loading: true })
//获取客户端用户详细信息
export const getCustomerEcho = (id) => request({ url: `web/customer/echo/${id}`, method: 'get', loading: true })
//升级服务
export const upgradeService = (data) => request({ url: `/web/enterprise/upgradeService`, method: 'post', data, loading: true })
//获取组织架构基本信息
export const getOrganization = (params) => request({ url: `/web/enterprise/organization/${params}`, method: 'get' })